home *** CD-ROM | disk | FTP | other *** search
- ; *******************************************************
- ; Example 1 - Open browser with basic example, click on the link
- ; with text "user forum"
- ; *******************************************************
- ;
- #include <IE.au3>
- $oIE = _IE_Example ("basic")
- _IELinkClickByText ($oIE, "user forum")
-
- ; *******************************************************
- ; Example 2 - Open browser to the AutoIt homepage, loop through the links
- ; on the page and click on the link with text "wallpaper"
- ; using a sub-string match.
- ; *******************************************************
- ;
- #include <IE.au3>
- $oIE = _IECreate("http://www.autoitscript.com")
-
- $sMyString = "wallpaper"
- $oLinks = _IELinkGetCollection($oIE)
- For $oLink in $oLinks
- $sLinkText = _IEPropertyGet($oLink, "innerText")
- If StringInStr($sLinkText, $sMyString) Then
- _IEAction($oLink, "click")
- ExitLoop
- EndIf
- Next